const sqlite3 = require('sqlite3').verbose();

let db;

export default function conDb(){
  const os = require('os');
  const homedir = os.homedir();
  const users = homedir.replace(/\\/g, '\\\\');
  if(!db || !db.open){
    db = new sqlite3.Database(users + '\\.db');
  };
  return db;
}